package com.sfc.spiderweb.entity.po.adb;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;

public class DataJsonDeserializer extends JsonDeserializer<String> {

    @Override
    public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
        String reshipType = jsonParser.getText();
        switch (reshipType) {
            case "0":
                return "主单";
            case "1":
                return "分单";
            case "2":
                return "重寄单";
            default:
                return "无类型";
        }
    }

}
